package com.wgzx.modbus.entity;

import com.wgzx.modbus.constant.FunctionCode;
import lombok.Getter;

@Getter
public abstract class PduFunc {

    /**
     * 功能码
     */
    protected final FunctionCode funcCode;

    public PduFunc(FunctionCode funcCode) {
        this.funcCode = funcCode;
    }

    protected short getFuncCodeValue() {
        return funcCode.getCode();
    }
}
